String clazzTpl({package}) => """
import 'dart:io';
import 'package:xanno/xanno.dart';
import 'package:dio/dio.dart' hide Headers;

/// 请叫我code哥
/// Generates Dart code
@Interface(host: 'https://api.muxiaoguo.cn/api/')
abstract class ApiInterface {
  ///***************************使用样例***************************
  @GET(url: "/tags")
  @Extra({'extraKey': 1, 'extraKey2': '2'})
  Future<List<dynamic>> getTags(@CancelRequest() CancelToken cancelReq);

  @GET(url: "/tags")
  Stream<List<String>> getTagsAsStream();

  @GET(url: "/tasks")
  @Extra({'isLoading': true})
  Future<List<dynamic>> getTasks();

  @GET(url: "/tasks/{id}")
  Future<dynamic> getTask(@Path("id") String id);

  @PATCH(url: "/tasks/{id}")
  Future<dynamic> updateTaskPart(
      @Path() String id, @Body() Map<String, dynamic> map);

  @PUT(url: "/tasks/{id}")
  Future<dynamic> updateTask(@Path() String id, @Body() dynamic task);

  @DELETE(url: "/tasks/{id}")
  Future<void> deleteTask(@Path() String id);

  @POST(url: "/tasks")
  Future<dynamic> createTask(@Body() dynamic task);

  @POST(url: "/tasks")
  Future<List<dynamic>> createTasks(@Body() List<dynamic> tasks);

  @POST(url: "/tasks")
  Future<List<String>> createTaskNames(@Body() List<String> tasks);

  @POST(host: "http://httpbin.org/post")
  Future<void> createNewTaskFromFile(@Part() File file);

  @Headers({"accept": "image/jpeg"})
  @GET(host: "http://httpbin.org/image/jpeg")
  @DioResponseType(ResponseType.bytes)
  Future<List<int>> getFile();

  @POST(host: "http://httpbin.org/post")
  @FormUrlEncoded()
  Future<String> postUrlEncodedFormData(
    @Field() String hello, {
    @Field() String? gg,
  });

  @HEAD(url: '/')
  Future<String> headRequest();

  @HEAD(url: '/')
  Future headRquest2();

  @HEAD(url: '/')
  Future<HttpResponse> headRquest3();

  @GET(url: "/task/group")
  Future<List<dynamic>> grouppedTaskByDate();

  @GET(url: "/task")
  Future<HttpResponse<List<dynamic>>> getTasksWithReponse();

  @DELETE(url: "/tasks/{id}")
  Future<HttpResponse<void>> deleteTaskWithResponse(@Path() String id);

  @POST(url: "/post")
  Future<String> postFormData(@Part() dynamic task, {@Part() File? file});

  @POST(url: "/post")
  Future<String> postFormData2(
      @Part() List<Map<String, dynamic>> task,
      @Part() List<String> tags,
      @Part(contentType: 'application/json') File file);

  @POST(url: "/post")
  Future<String> postFormData3(
      {@Part(value: "customfiles", contentType: 'application/json')
          List<File>? files,
      @Part()
          File? file});

  @POST(url: "/post")
  Future<String> postFormData6(
      {@Part(value: "customfiles") List<List<int>>? files,
      @Part() List<int>? file});

  @POST(url: "/post")
  Future<String> postFormData4(@Part() List<dynamic> tasks, @Part() File file);

  @POST(url: "/post")
  Future<String> postFormData5(
    @Part() List<dynamic> tasks,
    @Part() Map<String, dynamic> map,
    @Part() int a, {
    @Part() bool? b,
    @Part() double? c,
    @Part() String? d,
  });

  @GET(url: '/demo')
  Future<String> queries(@Queries() Map<String, dynamic> queries);

  @GET(url: '/enums')
  Future<String> queryByEnum(@Query('tasks') dynamic query);

  @GET(url: "/get")
  Future<String> namedExample(@Query("apikey") String apiKey,
      @Query("scope") String scope, @Query("type") String type,
      {@Query("from") int? from});

  @POST(url: "/postfile")
  @Headers({
    "Content-Type": "application/octet-stream",
    "Ocp-Apim-Subscription-Key": "abc"
  })
  Future<String> postFile({
    @Body() File? file,
    @SendProgress() Function(int, int)? sendProgress,
    @ReceiveProgress() Function(int, int)? receiveProgress,
  });

  @GET(url: "")
  Future<String> testCustomOptions(@DioOptions() Options options);

  ///***************************使用样例***************************
}
""";
